home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / var / lib / dpkg / info / nvidia-kernel-common.postinst < prev    next >
Encoding:
Text File  |  2006-10-09  |  1.9 KB  |  65 lines

  1. #! /bin/sh
  2. # postinst script for nvidia-kernel
  3. #
  4. # see: dh_installdeb(1)
  5.  
  6. set -e
  7.  
  8. # summary of how this script can be called:
  9. #        * <postinst> `configure' <most-recently-configured-version>
  10. #        * <old-postinst> `abort-upgrade' <new version>
  11. #        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
  12. #          <new-version>
  13. #        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
  14. #          <failed-install-package> <version> `removing'
  15. #          <conflicting-package> <version>
  16. # for details, see /usr/share/doc/packaging-manual/
  17. #
  18. # quoting from the policy:
  19. #     Any necessary prompting should almost always be confined to the
  20. #     post-installation script, and should be protected with a conditional
  21. #     so that unnecessary prompting doesn't happen if a package's
  22. #     installation fails and the `postinst' is called with `abort-upgrade',
  23. #     `abort-remove' or `abort-deconfigure'.
  24.  
  25.  
  26.  
  27. rm -f /etc/modutils/nvidia-kernel-nkc-devfs 2> /dev/null || true
  28. if [ -c /dev/.devfsd ] ; then 
  29.     ln -s /usr/share/nvidia-kernel-common/nvidia-kernel.modules.devfs /etc/modutils/nvidia-kernel-nkc-devfs
  30. fi
  31.  
  32.  
  33. if [ -x /sbin/update-modules ]; then
  34.     update-modules >/dev/null
  35. fi 
  36. if [ -x /usr/sbin/update-devfsd ] ; then
  37.         /usr/sbin/update-devfsd
  38. fi
  39.     
  40.  
  41. # Remove shutdown and reboot links; this init script does not need them.
  42. if dpkg --compare-versions "$2" lt "20051028+1ubuntu1"; then
  43.     rm -f /etc/rc0.d/K20nvidia-kernel /etc/rc6.d/K20nvidia-kernel
  44. fi
  45.  
  46.  
  47. # dh_installdeb will replace this with shell code automatically
  48. # generated by other debhelper scripts.
  49.  
  50. # Automatically added by dh_installinit
  51. if [ -x "/etc/init.d/nvidia-kernel" ]; then
  52.     update-rc.d nvidia-kernel multiuser >/dev/null
  53.     if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
  54.         invoke-rc.d nvidia-kernel start || exit $?
  55.     else
  56.         /etc/init.d/nvidia-kernel start || exit $?
  57.     fi
  58. fi
  59. # End automatically added section
  60.  
  61.  
  62. exit 0
  63.  
  64.  
  65.